<template>
    <el-container style="justify-content: center">
      <div class="info-text" style="color: #3A71A8">活 动 创 建 信 息</div>
      <el-main class="info-main" v-loading="loading">
        <el-form  ref="form" :model="form" label-width="120px">
          <el-form-item label="活动名称">
            <el-input v-model="form.name" style="width: 100%" />
          </el-form-item>
          <el-form-item label="活动地点">
            <el-select v-model="form.region" placeholder="选择地点">
              <el-option label="Zone one" value="shanghai" />
              <el-option label="Zone two" value="beijing" />
            </el-select>
          </el-form-item>
          <el-form-item label="活动时间">
            <el-col :span="11">
              <el-date-picker v-model="form.date1" type="date" placeholder="日期" style="width: 100%;" />
            </el-col>
            <el-col :span="2" class="line">-</el-col>
            <el-col :span="11">
              <el-time-picker v-model="form.date2" type="fixed-time" placeholder="时间" style="width: 100%;" />
            </el-col>
          </el-form-item>

          <!--      <el-form-item label="Instant delivery">-->
          <!--        <el-switch v-model="form.delivery" />-->
          <!--      </el-form-item>-->

          <el-form-item label="分类">
            <el-radio-group v-model="form.resource">
              <el-radio label="活动" />
              <el-radio label="通知 / 新闻" />
            </el-radio-group>
          </el-form-item>

          <el-form-item label="详细类型">
            <el-checkbox-group v-model="form.type">
              <el-checkbox label="线上活动" name="type" />
              <el-checkbox label="线下活动" name="type" />
              <el-checkbox label="企业活动" name="type" />
              <el-checkbox label="校内活动" name="type" />
            </el-checkbox-group>
          </el-form-item>
          <el-form-item label="活动内容">
            <el-input v-model="form.desc" type="textarea" />
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="onCreate" s >Create</el-button>
            <el-button @click="onCancel">Cancel</el-button>
          </el-form-item>
        </el-form>

      </el-main>
    </el-container>

</template>

<script>
  export default {
    name:'createActivity',
    data() {
      return {
        loading: false,
        form: {
          name: '',
          region: '',
          date1: '',
          date2: '',
          delivery: false,
          type: [],
          resource: '',
          desc: ''
        }
      }
    },
    methods: {
      onCreate() {
        this.$message('submit!')
      },
      onCancel() {
        this.$message({
          message: 'cancel!',
          type: 'warning'
        })
      }
    }
  }
</script>

<style scoped lang="scss">
  @import "../_styles/mobile-main";

  .line{
    text-align: center;
  }
</style>

